#include "Land.h"


Land::Land(float posX, float posY, float width, float height, Resources* res, int kind, int number, int depth)
:GameObject(posX, posY, width,height, res, number, depth)
{
	_sprite = new Sprite(_resources->Items, 8, 4, 1);

	switch (kind)
	{
	case ID::ID_Land:
		_id = ID::ID_Land;
		_sprite->Next(4);
		break;
	case ID::ID_StoneA:
		_id = ID::ID_StoneA;
		_sprite->Next(6);
		break;
	case ID::ID_StoneB:
		_id = ID::ID_StoneB;
		_sprite->Next(7);
		break;
	default:
		break;
	}

	_isStatic = true;
}


Land::~Land()
{
}

void Land::Render(LPD3DXSPRITE spriteHandler, Viewport* viewport)
{
	_sprite->Render(spriteHandler, _pos_x, _pos_y, true, viewport);
}
